<template>
  <div class="box">{{ 1 + 1 }}</div>
  <Row>
    <Button type="default" @click="add">操作</Button>
  </Row>
</template>

<script>
export default {
  data() {
    return {}
  },
  methods: {
    add() {
      console.log(`helloworld`)

      const f1 = (...abc) => {
        console.log(abc)
      }
      f1(1, 2, 3)

      const f2 = (a = 1) => {
        console.log(a)
      }
      f2()

      const f3 = (a = 1, b = 2) => {
        console.log(a, b)
      }
      f3()

      const f4 = (options = { a: 1, b: 2 }) => {
        console.log(options)
      }
      const op = {
        a: 9,
        b: 10
      }
      f4(op)
    }
  },
  mounted() {
    const a = 'a' | 'b' | 'c'
    console.log(a)
  }
}
</script>

<style lang="scss" scoped>
.box {
  width: 100px;
  height: 100px;
  border: 1px solid #000;
}
</style>
